home *** CD-ROM | disk | FTP | other *** search
- /***********************************************************************
- #
- # Proto.h
- #
- # This file contains the prototypes for the apps procs and funcs
- #
- # Author: Michael Marinkovich
- # Apple Developer Technical Support
- #
- #
- # Modification History:
- #
- # 6/4/95 MWM Initial coding
- # 10/12/95 MWM cleaned up
- #
- # Copyright © 1992-95 Apple Computer, Inc., All Rights Reserved
- #
- #
- ***********************************************************************/
-
- #include <Displays.h>
-
- //----------------------------------------------------------------------
- //
- // Aevt
- //
- //----------------------------------------------------------------------
-
- OSErr AEInit(void);
- void AEDispose(void);
- pascal OSErr DoAEOpenApp(AppleEvent *event,AppleEvent reply,long refCon);
- pascal OSErr DoAEQuitApp(AppleEvent *event,AppleEvent reply,long refCon);
- pascal OSErr DoAEOpenDoc(AppleEvent *event,AppleEvent reply,long refCon);
- pascal OSErr DoAEPrintDoc(AppleEvent *event,AppleEvent reply,long refCon);
- OSErr GotAEParams(AppleEvent *appleEvent);
-
-
- //----------------------------------------------------------------------
- //
- // Initialize
- //
- //----------------------------------------------------------------------
-
- OSErr Initialize(void);
- void ToolBoxInit(void);
- void CheckEnvironment(void);
- OSErr InitApp(void);
- void MenuSetup(void);
-
-
- //----------------------------------------------------------------------
- //
- // Main
- //
- //----------------------------------------------------------------------
-
-
- void HandleError(short errNo,Boolean fatal);
- void HandleAlert(short alertID);
-
-
- //----------------------------------------------------------------------
- //
- // Events
- //
- //----------------------------------------------------------------------
-
- void EventLoop(void);
- short MyGetSleep(void);
- void CustomWindowEvent(short eventType,WindowRef window,void *refCon);
- void DoEvent(EventRecord *event);
- void DoIdle(WindowRef window, void *refCon);
- void HandleMouseDown( EventRecord *event );
- void HandleMenuChoice( WindowRef window, void *refCon );
- void HandleContentClick( WindowRef window, void *refCon );
- void HandleZoomClick( WindowRef window, void *refCon );
- void HandleGrow(WindowRef window, void *refCon);
- void UpdateWindow(WindowRef window);
- void DoActivate(WindowRef window, void *refCon);
-
-
- //----------------------------------------------------------------------
- //
- // Windows
- //
- //----------------------------------------------------------------------
-
- WindowPtr CreateWindow(short resID, void *wStorage, Rect *bounds, Str255 title,
- Boolean visible, short procID,short kind, WindowRef behind,
- Boolean goAwayFlag,long refCon);
- OSErr RemoveWindow(WindowRef window);
- void NewWindowTitle(WindowRef window, Str255 str);
- OSErr InitWindowProcs(WindowRef window, short windKind);
- GWorldPtr PictToWorld(PicHandle pict, OSErr *rtnErr);
- void DrawWindow( WindowRef window, void *refCon );
- void DrawAboutWindow( WindowRef window, void *refCon );
- void DoResizeWindow (WindowRef window);
- short GetWindKind(WindowRef window);
- Boolean GetIsAppWindow(WindowRef window);
- Boolean GetIsAboutWindow( WindowRef window );
-
-
- //----------------------------------------------------------------------
- //
- // Displays
- //
- //----------------------------------------------------------------------
-
-
- // DM AppleEvent notification routines
- OSErr InstallAEDMNotification(void);
- pascal OSErr WorldChangedAppleEventProc(AppleEvent event,AppleEvent reply,long refCon);
-
- // DM Extended notification routines
- OSErr InstallExtendedDMNotification(void);
- pascal OSErr WorldChangedExtendedProc(void* userData,short theMessage,void* notifyData);
-
- // Common routines
- OSErr InstallDMNotification(void);
-
- OSErr HandleNotification(AppleEvent *event);
- OSErr HandleDeviceChange(DisplayIDType displayID, Rect *newRect);
- Boolean OutOfBoundsRect(Rect windRect, Rect screenRect);
- void MoveInbounds(WindowRef window, GDHandle gd, Rect screenRect);
- void ResizeInbounds(WindowRef window, GDHandle gd, Rect screenRect);
- GDHandle GetGreatestDevice(WindowRef window);
- void ResetStdState(WindowRef window);
- short GetWTitleHeight(WindowRef window);
-
-
- //----------------------------------------------------------------------
- //
- // Scrolls
- //
- //----------------------------------------------------------------------
-
- void InstallScrollBars(WindowRef window, DocHnd doc);
- void AdjustScrollValues(WindowRef window);
- void AdjustScrollbars(WindowRef window, Boolean resize);
- pascal void ScrollActionProc(ControlRef control, short part);
- void ScrollPict(short hAmount,short vAmount,WindowRef window);
- void MyScrollPicture(WindowRef window, short hs, short vs);
- void GetContRect(WindowRef window,Rect *contRect);
-
-
- //----------------------------------------------------------------------
- //
- // Utils
- //
- //----------------------------------------------------------------------
-
- void DoOpenNew(void);
- PicHandle ReadFile(FSSpec spec);
- void ZeroRect(Rect *r);
- void pstrcpy(StringPtr dst, StringPtr src);
- void pstrcat(StringPtr dst, StringPtr src);